#ifndef BLOGLISTWIDGET_H
#define BLOGLISTWIDGET_H

#include <QWidget>
#include <QVBoxLayout>
#include <QLabel>
#include <QScrollArea>
#include <QPushButton>
#include <QLineEdit>
#include <QRandomGenerator>
#include "component/item/BlogItemWidget.h"
#include "network/DataAccess.h"

class BlogListWidget : public QWidget
{
    Q_OBJECT
public:
    explicit BlogListWidget(QWidget *parent = nullptr);
    void load(const QList<BlogPreview> &blogPreviewList);

private:
    int currentPage;
    int totalPages;
    QWidget *container;
    QVBoxLayout *contentLayout;
    void updateContent();

signals:
    void openDetailPage();
};

#endif // BLOGLISTWIDGET_H
